// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 修改 修改UpdateVO中不为空的字段 PUT /aiApplication */
export async function update2(body: API.AiApplicationUpdateVO, options?: { [key: string]: any }) {
  return request<API.RAiApplication>(`/ai/aiApplication`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增 POST /aiApplication */
export async function save2(body: API.AiApplicationSaveVO, options?: { [key: string]: any }) {
  return request<API.RAiApplication>(`/ai/aiApplication`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除 DELETE /aiApplication */
export async function delete3(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/ai/aiApplication`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /aiApplication/${param0} */
export async function get2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.get2Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RAiApplicationResultVO>(`/ai/aiApplication/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 分页查询智能体配置 分页查询智能体配置 POST /aiApplication/applicationConfigPage */
export async function applicationConfigPage(
  body: API.PageParamsAiApplicationPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageAiApplicationResultVO>(`/ai/aiApplication/applicationConfigPage`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 检测名称是否可用 GET /aiApplication/check */
export async function check1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.check1Params,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/check`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 复制 POST /aiApplication/copy */
export async function copy2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.copy2Params,
  options?: { [key: string]: any }
) {
  return request<API.RAiApplication>(`/ai/aiApplication/copy`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 复制智能体 复制智能体 POST /aiApplication/copyApplication */
export async function copyApplication(
  body: API.AiApplicationSaveVO,
  options?: { [key: string]: any }
) {
  return request<API.RString>(`/ai/aiApplication/copyApplication`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除智能体 删除智能体 DELETE /aiApplication/delAiApplication */
export async function delAiApplication(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.delAiApplicationParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/delAiApplication`, {
    method: 'DELETE',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询单体详情 GET /aiApplication/detail */
export async function getDetail2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetail2Params,
  options?: { [key: string]: any }
) {
  return request<API.RAiApplicationResultVO>(`/ai/aiApplication/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /aiApplication/findByIds */
export async function findByIds2(body: number[], options?: { [key: string]: any }) {
  return request<API.RListAiApplicationResultVO>(`/ai/aiApplication/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 查询智能体详情 查询智能体详情 GET /aiApplication/getDetails */
export async function getDetails(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetailsParams,
  options?: { [key: string]: any }
) {
  return request<API.RAiApplicationResultVO>(`/ai/aiApplication/getDetails`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 授权智能体 授权智能体 POST /aiApplication/grant */
export async function grant(body: API.AiApplicationGrantVO, options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/ai/aiApplication/grant`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 查询智能体 查询智能体 POST /aiApplication/list */
export async function list(body: API.AiApplicationPageQuery, options?: { [key: string]: any }) {
  return request<API.RListAiApplicationResultVO>(`/ai/aiApplication/list`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 租户列表查询智能体 租户列表查询智能体 POST /aiApplication/listByTenantId */
export async function listByTenantId(
  body: API.AiApplicationPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RListAiApplicationResultVO>(`/ai/aiApplication/listByTenantId`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页查询智能体 分页查询智能体 POST /aiApplication/page */
export async function page2(
  body: API.PageParamsAiApplicationPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageAiApplicationResultVO>(`/ai/aiApplication/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 内置租户分页查询智能体 内置租户分页查询智能体 POST /aiApplication/pageByBuiltInTenant */
export async function pageByBuiltInTenant(
  body: API.PageParamsAiApplicationPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageAiApplicationResultVO>(`/ai/aiApplication/pageByBuiltInTenant`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /aiApplication/query */
export async function query2(body: API.AiApplicationPageQuery, options?: { [key: string]: any }) {
  return request<API.RListAiApplicationResultVO>(`/ai/aiApplication/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增智能体 新增智能体 POST /aiApplication/saveAiApplication */
export async function saveAiApplication(
  body: API.AiApplicationSaveVO,
  options?: { [key: string]: any }
) {
  return request<API.RString>(`/ai/aiApplication/saveAiApplication`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 修改智能体 修改智能体 PUT /aiApplication/updateAiApplication */
export async function updateAiApplication(
  body: API.AiApplicationUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/updateAiApplication`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 修改高级智能体 修改高级智能体 GET /aiApplication/updateAiApplicationByWF */
export async function updateAiApplicationByWf(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateAiApplicationByWFParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/updateAiApplicationByWF`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 修改排序 修改排序 GET /aiApplication/updateApplicationSortValue */
export async function updateApplicationSortValue(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateApplicationSortValueParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/updateApplicationSortValue`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 修改状态 租户分页查询智能体 GET /aiApplication/updateApplicationState */
export async function updateApplicationState(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateApplicationStateParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/ai/aiApplication/updateApplicationState`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}
